//
//  NewsListCell.m
//  Aierle
//
//  Created by jiayibai-02por on 2017/5/25.
//  Copyright © 2017年 WillyZhao. All rights reserved.
//

#import "NewsListCell.h"

#import "HCNewsListModel.h"

@interface NewsListCell()

@property (weak, nonatomic) IBOutlet UIView *line;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIView *pointView;

@end

@implementation NewsListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.line.backgroundColor = YBKRGBCOLOR(241, 241, 241, 1);
    self.titleLabel.font = [UIFont systemFontOfSize:14];
    self.titleLabel.textColor = [UIColor grayColor];
    self.timeLabel.font = [UIFont systemFontOfSize:12];
    self.timeLabel.textColor = [UIColor lightGrayColor];
    self.pointView.backgroundColor = YBKRGBCOLOR(251, 125, 53, 1);
    self.pointView.layer.cornerRadius = 2.5;
    self.hotView.layer.cornerRadius = 4.0;
    self.hotView.backgroundColor = YBKRGBCOLOR(245, 20, 32, 1);
}

-(void)setModel:(id)model {
    HCNewsListData *data = model;
    self.titleLabel.text = [NSString stringWithFormat:@"%@",data.title];
    self.timeLabel.text = [NSString stringWithFormat:@"【%@】",data.create_time];

}

- (void)setDataDic:(NSDictionary *)dataDic {

    _dataDic = dataDic;
    self.titleLabel.text = [dataDic objectForKey:@"title"];
    NSString *timestr = [NSString stringWithFormat:@"【%@】",[dataDic objectForKey:@"create_time"]];
    self.timeLabel.text = timestr;
}



@end
